package com.gzw.jackyweather.util;

import okhttp3.Callback;
import okhttp3.OkHttpClient;
import okhttp3.Request;

/**
 * Created by JACKYGUO on 2017/1/10.
 * 网络工具类
 */

public class HttpUtil {

    //发送一个okhttp请求
    public static void sendOkHttpRequest(String url, Callback callback) {
        OkHttpClient client = new OkHttpClient();
        Request request = new Request.Builder().url(url).build();
        client.newCall(request).enqueue(callback);
        System.out.println("request address"+url);
    }
}
